<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>页面未找到 - 404错误</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    :root {
      --primary: #3B82F6;
      --secondary: #10B981;
      --dark: #1F2937;
      --light: #F9FAFB;
      --gray: #6B7280;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      min-height: 100vh;
      transition: background-color 0.3s ease;
    }
    
    /* 通用样式 */
    .page-container {
      padding: 2rem 1rem;
      max-width: 500px;
      margin: 0 auto;
      text-align: center;
      height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    
    .error-code {
      font-size: 6rem;
      font-weight: 700;
      margin-bottom: 1rem;
      line-height: 1;
      transition: all 0.3s ease;
    }
    
    .error-message {
      font-size: 1.25rem;
      margin-bottom: 2rem;
      color: var(--gray);
    }
    
    .error-description {
      margin-bottom: 2.5rem;
      color: var(--gray);
      line-height: 1.6;
    }
    
    .btn-back {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.75rem 1.5rem;
      border-radius: 8px;
      font-weight: 500;
      text-decoration: none;
      transition: all 0.2s ease;
      border: none;
      cursor: pointer;
    }
    
    .theme-switcher {
      position: fixed;
      top: 1rem;
      right: 1rem;
      background: rgba(255,255,255,0.8);
      border-radius: 50%;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      cursor: pointer;
      z-index: 100;
    }
    
    /* 样式1 - 简约风格 */
    .style-1 {
      background-color: var(--light);
    }
    
    .style-1 .error-code {
      color: var(--primary);
    }
    
    .style-1 .btn-back {
      background-color: var(--primary);
      color: white;
    }
    
    .style-1 .btn-back:hover {
      background-color: #2563EB;
    }
    
    /* 样式2 - 深色风格 */
    .style-2 {
      background-color: var(--dark);
    }
    
    .style-2 .error-code {
      color: #FBBF24;
      text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    }
    
    .style-2 .error-message,
    .style-2 .error-description {
      color: #D1D5DB;
    }
    
    .style-2 .btn-back {
      background-color: #FBBF24;
      color: var(--dark);
    }
    
    .style-2 .btn-back:hover {
      background-color: #F59E0B;
    }
    
    /* 样式3 - 友好风格 */
    .style-3 {
      background-color: #F0FDF4;
    }
    
    .style-3 .error-code {
      color: var(--secondary);
      position: relative;
      display: inline-block;
    }
    
    .style-3 .error-code::after {
      content: "";
      position: absolute;
      bottom: 0.5rem;
      left: 10%;
      width: 80%;
      height: 0.5rem;
      background-color: rgba(16, 185, 129, 0.2);
      z-index: -1;
      border-radius: 50%;
    }
    
    .style-3 .btn-back {
      background-color: var(--secondary);
      color: white;
    }
    
    .style-3 .btn-back:hover {
      background-color: #059669;
    }
    
    /* 样式4 - 创意风格 */
    .style-4 {
      background-color: #FEF3C7;
      overflow: hidden;
      position: relative;
    }
    
    .style-4::before {
      content: "";
      position: absolute;
      top: -20%;
      left: -20%;
      width: 140%;
      height: 140%;
      background-image: 
        radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(251, 191, 36, 0.1) 0%, transparent 20%);
      z-index: 0;
    }
    
    .style-4 .page-content {
      position: relative;
      z-index: 1;
    }
    
    .style-4 .error-code {
      color: #DC2626;
      transform: rotate(-2deg);
      display: inline-block;
    }
    
    .style-4 .btn-back {
      background-color: white;
      color: #DC2626;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .style-4 .btn-back:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
    }
    
    /* 动画效果 */
    @keyframes float {
      0% { transform: translateY(0px); }
      50% { transform: translateY(-10px); }
      100% { transform: translateY(0px); }
    }
    
    .floating {
      animation: float 3s ease-in-out infinite;
    }
    
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }
    
    .pulsing {
      animation: pulse 2s ease-in-out infinite;
    }
    
    /* 隐藏所有样式，只显示当前激活的 */
    .page-style {
      display: none;
    }
    
    .page-style.active {
      display: block;
    }
  </style>
</head>
<body>
  <!-- 主题切换器 -->
  <div class="theme-switcher" id="themeSwitcher">
    <i class="fa fa-refresh"></i>
  </div>
  
  <!-- 样式1 - 简约风格 -->
  <div class="page-style style-1 active" id="style1">
    <div class="page-container">
      <div class="page-content">
        <div class="error-code floating">404</div>
        <h2 class="error-message">页面未找到</h2>
        <p class="error-description">
          抱歉，您访问的页面不存在或已被移除。<br>
          可能是链接有误或页面已更改。
        </p>
        <button class="btn-back">
          <i class="fa fa-arrow-left"></i>
          返回首页
        </button>
      </div>
    </div>
  </div>
  
  <!-- 样式2 - 深色风格 -->
  <div class="page-style style-2" id="style2">
    <div class="page-container">
      <div class="page-content">
        <div class="error-code pulsing">404</div>
        <h2 class="error-message">迷失方向了</h2>
        <p class="error-description">
          我们找不到您要访问的页面。<br>
          它可能已被移动或删除。
        </p>
        <button class="btn-back">
          <i class="fa fa-home"></i>
          返回安全地带
        </button>
      </div>
    </div>
  </div>
  
  <!-- 样式3 - 友好风格 -->
  <div class="page-style style-3" id="style3">
    <div class="page-container">
      <div class="page-content">
        <i class="fa fa-search fa-4x mb-4" style="color: var(--secondary);"></i>
        <div class="error-code">404</div>
        <h2 class="error-message">哎呀，没找到页面</h2>
        <p class="error-description">
          我们尽力寻找了，但您要的页面似乎不见了。<br>
          不如回到首页，重新开始？
        </p>
        <button class="btn-back">
          <i class="fa fa-smile-o"></i>
          回到首页
        </button>
      </div>
    </div>
  </div>
  
  <!-- 样式4 - 创意风格 -->
  <div class="page-style style-4" id="style4">
    <div class="page-container">
      <div class="page-content">
        <i class="fa fa-compass fa-4x mb-4" style="color: #DC2626; transform: rotate(45deg);"></i>
        <div class="error-code">404</div>
        <h2 class="error-message">页面跑丢了！</h2>
        <p class="error-description">
          这个页面好像迷路了，我们正在努力寻找它。<br>
          您可以先回到首页，稍后再试。
        </p>
        <button class="btn-back">
          <i class="fa fa-magic"></i>
          回到安全区域
        </button>
      </div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 获取DOM元素
    const themeSwitcher = document.getElementById('themeSwitcher');
    const styles = document.querySelectorAll('.page-style');
    const backButtons = document.querySelectorAll('.btn-back');
    
    // 当前激活的样式索引
    let currentStyleIndex = 0;
    
    // 切换样式
    themeSwitcher.addEventListener('click', function() {
      // 隐藏当前样式
      styles[currentStyleIndex].classList.remove('active');
      
      // 计算下一个样式索引
      currentStyleIndex = (currentStyleIndex + 1) % styles.length;
      
      // 显示下一个样式
      styles[currentStyleIndex].classList.add('active');
      
      // 添加切换动画效果
      this.classList.add('fa-spin');
      setTimeout(() => {
        this.classList.remove('fa-spin');
      }, 500);
    });
    
    // 返回按钮点击事件
    backButtons.forEach(button => {
      button.addEventListener('click', function() {
        // 模拟返回首页操作
        alert('返回首页（实际应用中会跳转到首页）');
      });
    });
    
    // 页面加载动画
    window.addEventListener('load', function() {
      const currentStyle = document.querySelector('.page-style.active');
      currentStyle.style.opacity = '0';
      currentStyle.style.transform = 'translateY(20px)';
      currentStyle.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
      
      setTimeout(() => {
        currentStyle.style.opacity = '1';
        currentStyle.style.transform = 'translateY(0)';
      }, 100);
    });
  </script>
</body>
</html>
